const mongoose = require('mongoose')
// 商家
const schema = new mongoose.Schema({
  username: { type: String }, // 用户名
  password: { 
    type: String,
    select: false,
    set (val) {
      return require('bcryptjs').hashSync(val, 10)
    }
   } // 密码
})

module.exports = mongoose.model('AdminUser', schema)